package exception;

public class FinallyDemo2 {
    public static void main(String[] args) {
        System.out.println(test("s")+","+test(null)+","+test(""));
    }
    public static int test(String s){
        try{
            return s.charAt(0)-'0';
        }catch(NullPointerException e){
            return 1;
        }catch(Exception e){
            return 2;
        }finally{
            return 3;
        }
    }
}
